(defun factors (n)
  (loop 
     with nf = n
     with facts = ()
     for i = 2 then  (1+ i)
     when (zerop (mod nf i))
     do (and (setq facts (cons i facts)) 
	     (loop while (zerop (mod nf i)) do (setq nf (/ nf i))))
     until (= nf 1)
     finally (return facts))))
       

(defun consec-fact(n)
  (loop for i = 2 then (1+ i)
     with k = 0
     do (setq k (if  (= (length (factors i)) n) (1+ k) 0))
     until (= k n)
     finally (return (- i (1- n)))))